var counter1 = require('./util/counter');
var counter2 = require('./util/counter');
var fs = require('fs');

console.log(counter1.count());
console.log(counter2.count());
console.log(counter2.count());

// function copy(src, dst) {
//     fs.writeFileSync(dst, fs.readFileSync(src));
// }

// function main(argv) {
//     copy(argv[0], argv[1]);
// }

// main(process.argv.slice(2));

var http = require('http');

http.createServer(function (request, response) {
    var body = [];
    console.log(request.method);
    console.log(request.headers);

    request.on('data', function (chunk) {
        body.push(chunk);
    })

    request.on('end', function () {
        body = Buffer.concat(body);
        console.log(body.toString());
    });
    // response.writeHead(200, {'Content-Type': 'text-plain'});
    // response.end('Hello World\n');
}).listen(8125);

function main(argv) {
    console.log(argv)
}

main(process.argv);